* $wgCookiePrefix:
** Shared stuff should always come before local stuff when setting the cookie prefix (by my count, if you set $wgSharedDB and $wgDBprefix with the old order, even though your usertable is shared, your cookies would be local and logins wouldn't be shared right.
** Because the user table isn't always shared anymore, we only want shared code when $wgSharedTables has 'user' set inside of it.
** We now have $wgSharedPrefix, this should also be accounted for in the cookie prefix.
* updaders.inc: The logic for the $doUser test has changed since the conditions that the user table is shared has changed. Now when $shared is true we only want to $doUser when we have a shared database and 'user' is being shared, otherwise if $shared is false, we only want to $doUser when there is no shared database, or 'user' is not being shared.
Check MediaWiki.org's $wgSharedDB documentation for those on 1.12, I'll post a link there to a patch I maintain for 1.12.
# Set default shared prefix
if( $wgSharedPrefix === false ) $wgSharedPrefix = $wgDBprefix;
-if ( $wgDBprefix ) {
- $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix;
-} elseif ( $wgSharedDB ) {
+if ( in_array('user', $wgSharedTables) && $wgSharedDB && $wgSharedPrefix ) {
+ $wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix;
+} elseif ( in_array('user', $wgSharedTables) && $wgSharedDB ) {
$wgCookiePrefix = $wgSharedDB;
+} elseif ( $wgDBprefix ) {
+ $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix;
} else {
$wgCookiePrefix = $wgDBname;
}
}
function do_all_updates( $shared = false, $purge = true ) {
- global $wgNewTables, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgDatabase, $wgDBtype, $IP;
+ global $wgNewTables, $wgNewFields, $wgRenamedTables, $wgSharedDB, $wgSharedTables, $wgDatabase, $wgDBtype, $IP;
wfRunHooks('LoadExtensionSchemaUpdates');
- $doUser = !$wgSharedDB || $shared;
+ $doUser = $shared ? $wgSharedDB && in_array('user', $wgSharedTables) : !$wgSharedDB || !in_array('user', $wgSharedTables);
if ($wgDBtype === 'postgres') {
do_postgres_updates();